Mathematical Functions |
|
Mathematical functions are used to perform mathematical operations on data during transformation. For example, if two collaborating enterprises use different units to express quantity, you can plug in a mathematical function that converts the quantity from the source to make it compatible with the target system. Refer to Transforming Data using XSLT Functions, for more information on the procedure to transform the data using XSLT functions.
Remember: The mathematical function block accepts only integers as valid inputs. Convert all source data into a numeric format using the Numeric function.
The various mathematical functions supported by Cordys, their functionality, and parameters that have to be specified are described in the following table:
Table 1. Mathematical Functions
Mathematical Function |
Description |
Parameters |
---|---|---|
Integer |
Converts the source data into an integer |
Number - Specify the source element which has to be converted into an integer. |
Absolute |
Returns the absolute value of a number |
Number - Specify the source element for which the absolute value has to be returned. |
Modulo |
Returns the remainder as a result of a division |
Number - This parameter in the function takes the dividend as input. Divisor - This parameter in the function takes the divisor as input. |
Square Root |
Returns the square root of a number |
Number - Specify the source element for which the square root has to be returned. |
Addition |
Returns the sum of two or more numbers |
Number to Add - This parameter in the function takes the first element to be added.Specify the additional elements to be added in the subsequent parameters. |
Subtraction |
Returns the difference of two numbers |
Number - This parameter in the function block takes the element to be subtracted from. Number to be Subtracted - Specify the elements to be subtracted in this parameter. |
Multiplication |
Returns the product of two or more numbers |
Number - This parameter in the function block takes the first element to be multiplied.Specify the additional elements to be multiplied in the subsequent parameters. |
Division |
Returns the result of dividing two numbers |
Number - This parameter in the function takes the dividend as input. Divisor - This parameter in the function takes the divisor as input. |
Rounding |
Rounds off a number to its nearest integer |
Number - Specify the source element which has to be rounded off to the nearest integer. |